package subraSoft.fenix.model.authentication.cobj;

import java.io.Serializable;

import subraSoft.centaurus.model.cobj.CenDefaultCObj;


public class FenObjSecCObj extends CenDefaultCObj 
	implements Serializable, Comparable<FenObjSecCObj>
{
	private static final long serialVersionUID = 1L;
	private String id;
	private String descripcion;
	
	@Override
	public Object getId() {
		return id;
	}
	
	@Override
	public void setId(Object id) {
		this.id = (String) id;
	}
	
	public String getDescripcion() {
		return descripcion;
	}
	
	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}

	public int compareTo(FenObjSecCObj o) {
		return id.compareTo(o.id);
	}
	
	@Override
	public String toString() {
		return descripcion;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FenObjSecCObj other = (FenObjSecCObj) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
	
}
